<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
    <link rel="stylesheet" href="/style.css">
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <style>
        span:before{
            content: ' ';
            background: url('./img//play.png') no-repeat;
        }
    </style>
</head>
<body>
    <div class="container">
        <div id="re-first" class="re-first">
            <ul>
                
                <li><img src='' alt=""><div id="div1"></div><span>1</span></li>
                <li><img src='' alt=""><div id="div1"></div></li>
                <li><img src='' alt=""><div id="div1"></div></li>
                <li><img src='' alt=""><div id="div1"></div></li>
                <li><img src='' alt=""><div id="div1"></div></li>
                <li><img src='' alt=""><div id="div1"></div></li>
                <li><img src='' alt=""><div id="div1"></div></li>
                <li><img src='' alt=""><div id="div1"></div></li>
                <li><img src='' alt=""><div id="div1"></div></li>
                <li><img src='' alt=""><div id="div1"></div></li>
            </ul>
        </div>

    </div>
</body>
<script>
    axios.get('http://localhost:3000/personalized',{
        params:{
            limit:30
        }
    }).then((res)=>{
        for(var i = 0;i<10;i++){
        console.log(res.data.result[i])
        var pct = JSON.stringify(res.data.result[i].picUrl).replace('"','').replace('"','')  
        document.getElementById('re-first').querySelectorAll('div')[i].innerText=JSON.stringify(res.data.result[i].name)
        document.getElementById('re-first').querySelectorAll('img')[i].setAttribute('src',pct)  
        }
        for(var i =5;i<10;i++){
        console.log(res.data.result[i])
        var pct = JSON.stringify(res.data.result[i].picUrl).replace('"','').replace('"','')  


        }
    })

</script>

</html>